﻿using System.Collections;
using System.Collections.Generic;

namespace winS.Unity.Process
{
    /// <summary>
    /// 步骤.
    /// 表示 <see cref="IProcess"/> 下单个行为的抽象
    /// </summary>
    public interface IStep
    {
        /// <summary>
        /// GUID of step.
        /// </summary>
        public string guid { get; set; }
        /// <summary>
        /// 该步骤是否被静音.
        /// 被静音的步骤将跳过执行(后续的步骤依旧执行)
        /// </summary>
        public bool isMute { get; set; }
        /// <summary>
        /// 该步骤是否只允许执行一次后续步骤.
        /// 如果为 true, 则当该步骤被多个上级步骤触发并执行后, 只会向后执行一次后续步骤(自身逻辑依旧会执行多次).
        /// </summary>
        public bool isOnlyOnceNextSteps { get; }

        /// <summary>
        /// Editor drawing data for this Step (EditorOnly).
        /// </summary>
        public DrawingData drawingData { get; }

        /// <summary>
        /// 表示该步骤如何执行
        /// </summary>
        public IEnumerator Execute(ProcessContext processContext);

        public IEnumerable<string> GetSubsequentSteps(ProcessContext processContext);
    }
}